Class Functions.ConstantFunction<E>

  • All Implemented Interfaces:
    Function<java.lang.Object,​E>, java.io.Serializable
    Enclosing class:
    Functions

    private static class Functions.ConstantFunction<E>
    extends java.lang.Object
    implements Function<java.lang.Object,​E>, java.io.Serializable
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static long serialVersionUID  
      private E value  
    • Constructor Summary

      Constructors 
      Constructor Description
      ConstantFunction​(E value)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      E apply​(java.lang.Object from)  
      boolean equals​(java.lang.Object obj)  
      int hashCode()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • value

        private final E value
    • Constructor Detail

      • ConstantFunction

        public ConstantFunction​(E value)
    • Method Detail

      • apply

        public E apply​(java.lang.Object from)
        Specified by:
        apply in interface Function<java.lang.Object,​E>
      • equals

        public boolean equals​(java.lang.Object obj)
        Specified by:
        equals in interface Function<java.lang.Object,​E>
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object